<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link rel="stylesheet" type="text/css" href="<%=basePath%>static/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>static/themes/icon.css">
	<script type="text/javascript" src="<%=basePath%>static/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>static/jquery.easyui.min.js"></script>
	
	
  </head>
  
  <body>
    <table id="dg" class="easyui-datagrid" title="Custom DataGrid Pager" style="width:700px;height:250px"
			data-options="rownumbers:true,singleSelect:true,pagination:true,fit:true,url:'demo_showlist.action'">
		<thead>
			<tr>
				<th data-options="field:'userId'">userId</th>
				<th data-options="field:'userName'">userName</th>
				<th data-options="field:'password'">password</th>
				<th data-options="field:'email'">email</th>
				<th data-options="field:'brithday'">brithday</th>
			</tr>
		</thead>
	</table>
	
	<script type="text/javascript">
		$(function(){
			var pager = $('#dg').datagrid('getPager');	// get the pager of datagrid
			pager.pagination({
				top:[{
					iconCls:'icon-search',
					handler:function(){
						alert('search');
					}
				},{
					iconCls:'icon-add',
					handler:function(){
						alert('add');
					}
				},{
					iconCls:'icon-edit',
					handler:function(){
						alert('edit');
					}
				}]
			});			
		})
	</script>
    
  </body>
</html>
